import Layout from '@/views/layout/Layout';

// 数据
const approvalRouter = [
  {
    path: '/homePage',
    component: Layout,
    redirect: '/homePage/approvalModule',
    name: 'approval',
    meta: { title: '审批', icon: 'sidebar-approval' },
    children: [{
      path: 'approvalModule',
      name: 'approvalModule',
      component: () => import('@/views/approvalModule/index'),
      meta: { title: '审批模块', keepAlive: false, isChange: false, headerBarShow: true, showBadge: true }
    }, {
      path: 'todo',
      name: 'todo',
      meta: { title: '待办中心', keepAlive: true, isChange: false, headerBarShow: false, showBadge: true },
      component: () => import('@/views/todo/index')
    },
    /**
     * 待办中心内页
    **/
    {
      path: 'todoDetail/:id',
      component: () => import('@/views/todo/detail/index'),
      name: 'todoDetail',
      hidden: true,
      meta: { title: '通知详情', headerBarShow: true, activeMenu: '/homePage/todo' }
    },
    {
      path: 'clearFeishuTodo',
      component: () => import('@/views/todo/module/clearFeishuTodo'),
      name: 'clearFeishuTodo',
      hidden: true,
      meta: { title: '清理飞书待办', headerBarShow: true, activeMenu: '/homePage/todo' }
    },
    /**
     * 审批模块内页
    **/
    {
      path: 'approvalList/:id',
      name: 'approvalList',
      hidden: true,
      component: () => import('@/views/approvalModule/approvalList/index'),
      meta: { title: '', keepAlive: true, isChange: true, headerBarShow: false, activeMenu: '/homePage/approvalModule' }
    },
    {
      path: 'approvalModuleCreate/:moduleId',
      name: 'approvalModuleCreate',
      hidden: true,
      component: () => import('@/views/approvalModule/approvalList/create'),
      meta: { title: '发起审批', headerBarShow: false, activeMenu: '/homePage/approvalModule' }
    },
    {
      path: 'approvalModuleEdit/:moduleId',
      name: 'approvalModuleEdit',
      hidden: true,
      component: () => import('@/views/approvalModule/approvalList/create'),
      meta: { title: '编辑审批', headerBarShow: false, activeMenu: '/homePage/approvalModule' }
    },
    {
      path: 'approvalModuleDetail/:moduleId',
      name: 'approvalModuleDetail',
      hidden: true,
      component: () => import('@/views/approvalModule/approvalList/detail'),
      meta: { title: '审批详情', headerBarShow: false, activeMenu: '/homePage/approvalModule' }
    }]
  }
];

export default approvalRouter;
